package fy.input.conf;

import java.util.List;

/**
 * 扩张控件需要查询的数据，查询条件的设置
 * @author zc
 *
 */
class FormBean {

	private CommonFieldsBean commonFieldBean;
	
	private List<RepeatTableBean> repeatTableBeans;
	
	private List<FieldMappingBean> conditions;

	public CommonFieldsBean getCommonFieldBean() {
		return commonFieldBean;
	}

	public void setCommonFieldBean(CommonFieldsBean commonFieldBean) {
		this.commonFieldBean = commonFieldBean;
	}

	public List<RepeatTableBean> getRepeatTableBeans() {
		return repeatTableBeans;
	}

	public void setRepeatTableBeans(List<RepeatTableBean> repeatTableBeans) {
		this.repeatTableBeans = repeatTableBeans;
	}

	public List<FieldMappingBean> getConditions() {
		return conditions;
	}

	public void setConditions(List<FieldMappingBean> conditions) {
		this.conditions = conditions;
	}
}

/**
 * 普通字段
 * @author zc
 *
 */
class CommonFieldsBean{
	
	/**
	 * 需要获得数据的字段
	 */
	private List<FieldMappingBean> fieldMappingBeans;
	
	/**
	 * 查询的ＳＱＬ,查询条件需要相同，使用conditions
	 */
	private String sql;

	public List<FieldMappingBean> getFieldMappingBeans() {
		return fieldMappingBeans;
	}

	public void setFieldMappingBeans(List<FieldMappingBean> fieldMappingBeans) {
		this.fieldMappingBeans = fieldMappingBeans;
	}

	public String getSql() {
		return sql;
	}

	public void setSql(String sql) {
		this.sql = sql;
	}
}
/**
 * 重复表字段
 * @author zc
 *
 */
class RepeatTableBean{
	
	/**
	 * 需要获得数据的字段
	 */
	private List<FieldMappingBean> fieldMappingBeans;
	
	/**
	 * 查询的ＳＱＬ,查询条件需要相同，使用conditions
	 */
	private String sql;

	public List<FieldMappingBean> getFieldMappingBeans() {
		return fieldMappingBeans;
	}

	public void setFieldMappingBeans(List<FieldMappingBean> fieldMappingBeans) {
		this.fieldMappingBeans = fieldMappingBeans;
	}

	public String getSql() {
		return sql;
	}

	public void setSql(String sql) {
		this.sql = sql;
	}
}


/**
 * 字段映射
 * @author zc
 *
 */
class FieldMappingBean {

	/**
	 * SQL语句中字段的名称
	 */
	private String col_name;

	/**
	 * 表单中字段的名字
	 */
	private String fieldName;

	public String getCol_name() {
		return col_name;
	}

	public void setCol_name(String col_name) {
		this.col_name = col_name;
	}

	public String getFieldName() {
		return fieldName;
	}

	public void setFieldName(String fieldName) {
		this.fieldName = fieldName;
	}
}